﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.IO.Compression;

namespace ArgusPCLib.Bird
{
	public interface IPlatformInterface : IDisposable
	{
		/// <summary>
		/// Implementors should return a user-specific and read-/writable <see cref="Stream"/>
		/// in which the application can store long-term data.
		/// </summary>
		Stream GetUserDataStream();

		/// <summary>
		/// Implementors should subscribe the <paramref name="unhandledExceptionEventHandler"/>
		/// to a platform-specific UnhandledException-Event.
		/// </summary>
		/// <param name="unhandledExceptionEventHandler">The handler for UnhandledException-Event.</param>
		void RegisterUnhandledExceptionEventHandler(UnhandledExceptionEventHandler unhandledExceptionEventHandler);

		/// <summary>
		/// This method is called, when an unhandled <see cref="Exception"/> is raised.
		/// Implementors should save screenshots of all relevant windows/screens. On image per <see cref="Stream"/>
		/// obtained with <paramref name="getStream"/>.
		/// </summary>
		/// <param name="getStream">
		/// A handler which should be used to obtain the <see cref="Stream"/>s
		/// to which the screenshots are saved.
		/// </param>
		void AddScreenshots(Func<string,Stream> getStream);

		void RegisterExitEventHandler(ExitEventHandler exitEventHandler);
	}
}
